package csc.fresher.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import csc.fresher.dao.AccountHasInterestRateDao;
import csc.fresher.entity.AccountHasInterestRate;
import csc.fresher.entity.SavingAccountHasInterestRate;
import csc.fresher.service.SavingBookService;
@Service
public class SavingBookServiceImpl implements SavingBookService{
	@Autowired
	AccountHasInterestRateDao accountHasInterestRateDao;
	
	@Override
	public List<AccountHasInterestRate> getSavingBookByAccountNumber(
			long accountNumber) {
		List<AccountHasInterestRate> accountHasInterestRates = null;
		if(accountHasInterestRateDao != null){
			accountHasInterestRates = accountHasInterestRateDao.getAllAccountHasInterestRates(accountNumber);
		} else {
			System.err.println("Account has interest rate dao is null");
		}
		return accountHasInterestRates;
	}
}
